package cur.channel.client.netty;

import cur.channel.client.util.CommonUtils;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
import java.util.List;

@Data
@Component
@ConfigurationProperties(prefix = "channel.netty")
public class NettyProperties {
    private String username;
    private String password;
    private List<String> url;
    private Integer reconnectWaitSecond;
    private Integer taskRequestWaitTime;
    private Integer readWaitSecond;
    private Integer writeWaitSecond;
    private Integer groupId;

    public static String clientId;//当前节点客户点编号
    public static Integer nodeNum=0;//当前节点编号
    public static Integer totalNode=0;//client总节点数

    public NettyProperties() {
        clientId = CommonUtils.getIp()+":"+CommonUtils.getUUId();
    }
}
